<?php

/**
 * InvoiceAmounts form base class.
 *
 * @method InvoiceAmounts getObject() Returns the current form's model object
 *
 * @package    erpcrm
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 24171 2009-11-19 16:37:50Z Kris.Wallsmith $
 */
abstract class BaseInvoiceAmountsForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'invoice_iden' => new sfWidgetFormInputHidden(),
      'amount_iden'  => new sfWidgetFormInputHidden(),
      'amount'       => new sfWidgetFormInputText(),
      'discount1'    => new sfWidgetFormInputText(),
      'discount2'    => new sfWidgetFormInputText(),
      'discount3'    => new sfWidgetFormInputText(),
      'discount4'    => new sfWidgetFormInputText(),
      'description'  => new sfWidgetFormInputText(),
    ));

    $this->setValidators(array(
      'invoice_iden' => new sfValidatorPropelChoice(array('model' => 'Invoice', 'column' => 'invoice_iden', 'required' => false)),
      'amount_iden'  => new sfValidatorPropelChoice(array('model' => 'InvoiceAmounts', 'column' => 'amount_iden', 'required' => false)),
      'amount'       => new sfValidatorNumber(),
      'discount1'    => new sfValidatorInteger(array('min' => -2147483648, 'max' => 2147483647)),
      'discount2'    => new sfValidatorInteger(array('min' => -2147483648, 'max' => 2147483647)),
      'discount3'    => new sfValidatorInteger(array('min' => -2147483648, 'max' => 2147483647)),
      'discount4'    => new sfValidatorInteger(array('min' => -2147483648, 'max' => 2147483647)),
      'description'  => new sfValidatorString(array('max_length' => 500)),
    ));

    $this->widgetSchema->setNameFormat('invoice_amounts[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'InvoiceAmounts';
  }


}
